package com.quanthium;


import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;


@Data
public class DeviceShadowReq {

    private String produceId;
    private String deviceId;
    private State state;
    private Metadata metadata;
    private String version = "1.0";
    private Long timestamp = System.currentTimeMillis();


    @Data
    public static class State {
        @JSONField(name = "reported")
        private Map<String, Object> reported = new HashMap<>();

        @JSONField(name = "desired")
        private Map<String, Object> desired = new HashMap<>();
    }

    @Data
    public static class Metadata {
        @JSONField(name = "reported")
        private Map<String, Object> reported = new HashMap<>();

        @JSONField(name = "desired")
        private Map<String, Object> desired = new HashMap<>();
    }
}